//
//  HeadlineTableViewCell.m
//  PhoenixNews
//
//  Created by dllo on 16/1/16.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "HeadlineTableViewCell.h"

@implementation HeadlineTableViewCell

- (void)dealloc {
    [_TitleImage release];
    [_title release];
    [_time release];
    [_comments release];
    [_Commentsimage release];
    [super dealloc];
}
// 初始化
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.TitleImage = [[UIImageView alloc] init];
        self.TitleImage.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_TitleImage];
        [self.TitleImage release];
        
        self.title = [[UILabel alloc] init];
       
        [self.contentView addSubview:_title];
        [self.title release];
        
        self.comments = [[UILabel alloc] init];
        [self.contentView addSubview:_comments];
        [self.contentView release];
        
        self.time = [[UILabel alloc] init];
        
        [self.contentView addSubview:_time];
        [_time release];
        
        self.Commentsimage = [[UIImageView alloc] init];
        [self.contentView addSubview:_Commentsimage];
        [_Commentsimage release];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    _TitleImage.frame = CGRectMake(20, 20, 130, 100);
    _title.frame = CGRectMake(160, 10, 210, 80);
    _title.numberOfLines = 0;
    
    _comments.frame = CGRectMake(self.frame.size.width - 65, 82, 70, 40);
    _comments.alpha = 0.8;
    _comments.font = [UIFont systemFontOfSize:10];
    _Commentsimage.frame = CGRectMake(self.frame.size.width - 30, 95, 15, 15);
    _time.frame = CGRectMake(160, 80, 70, 40);
    _time.alpha = 0.8;
    _time.font = [UIFont systemFontOfSize:10];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
